define(function (require, exports, module) {
    return function setApp(app) {
        app.controller('PuhuibaoWithdrawCtrl', ['$scope','ZhifubaoTransfer','$filter','$timeout','$http',function ($scope,ZhifubaoTransfer,$filter,$timeout,$http) { 
     //------------------gridlist--------- 	 
       	 $scope.pager =  ZhifubaoTransfer;
      	 $scope.params = {};
      	 $scope.params.orderBy = 'create_time';
      	 $scope.params.order = 'desc';
      
      	 
 
 
         $scope.confirm = function(recordId) { 
        	var audituserid =  $scope.USER_INFO.id;
        	var name =  $scope.USER_INFO.userName;
       	    var pathName = window.document.location.pathname;
  	        var projectName = pathName.substring(0, pathName.substr(1).indexOf('/')+1);
 	         var url = projectName + "/zhifubaoTransfer/finishWithdraw.shtml?&signature=c1bc53c77324069f0f949d23e710838d&timestamp=1427373821045&recordId="+recordId+"&audituserid="+audituserid+"&name="+name;
         	
 	         
 	        $http({
				method : 'post',
				url :  url
			}).success(function(result) {
     			//错误等信息提示
     			if(result.status == 0){
     				$scope.createErrorMessage = result.message;
     			} else{
     				$scope.refresh('current',true);
  
     			}
     			$timeout(function(){
        			$scope.createErrorMessage ="";
        			
           	    } , 3000);
     			 
     		});
 	         
  
         }
         
 
            
 
           
           


        }]);
    }
});